﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Collections;
using XWord.Fundamental.Domain.Services;
using XWord.WPF.ApplicationFramework.Extensions;
using System.Windows.Controls.Primitives;
using System.Threading;
using System.Globalization;
using Microsoft.Practices.ServiceLocation;
using XWord.WPF.ApplicationFramework;
using XWord.GUI.Presenters.Fundamental;
namespace XWord.GUI.Views.Fundamental
{
    /// <summary>
    /// Interaction logic for WordExplorerView.xaml
    /// </summary>
    public partial class WordExplorerView : UserControl
    {
        public WordExplorerView()
        {
            InitializeComponent();
           
        }
        private void Element_WordList_PreviewMouseRightButtonDown(object sender, MouseButtonEventArgs e)
        {
            e.Handled = true;
        }

        private void Element_WordList_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            var DragSource = (ListBox)sender;

            object data = Element_WordList.SelectedItem;

            if (data != null)
            {
                Element_WordList.AllowDrop = false;
                DragDrop.DoDragDrop(DragSource, data, DragDropEffects.Move | DragDropEffects.None);
                Element_WordList.AllowDrop = true;
            }
        }
    }
}
